exports.request = function (app, queryResponse, io) {


  io.on('connection', function (socket) {
    setInterval(function () {
      socket.emit('sysTransaction', queryResponse.sysTransactionIO);//实时数据展示首页当日系统交易推送
      socket.emit('health', queryResponse.healthIO);//实时数据展示首页健康度推送
      socket.emit('sysPerformance', queryResponse.sysPerformanceIO);//实时数据展示首页系统性能指数推送
      socket.emit('volumeOfBus', queryResponse.volumeOfBusIO);//实时数据展示首页实时业务量推送
      socket.emit('topUpPrefer', queryResponse.topUpPreferIO);//实时数据展示首页用户充值偏好推送
    }, 5000);
    setInterval(function () {
      socket.emit('successRate', queryResponse.successRateIO);//实时数据展示首页成功率推送
      socket.emit('provinceSuccessRateOfTrans', queryResponse.provinceSuccessRateOfTransIO);//实时数据展示首页分省实时交易成功率推送
      socket.emit('provinceVolumeOfBus', queryResponse.provinceVolumeOfBusIO);//实时数据展示首页推送实时分省业务量推送
    }, 5000);
  });

  //实时数据展示：当日系统交易查询
  app.get('/sas/timeDataDis/sysTransaction/query', function (req, res) {
    res.send(queryResponse.sysTransaction);
  });

  //实时数据展示：系统性能指数查询
  app.get('/sas/timeDataDis/sysPerformance/query', function (req, res) {
    res.send(queryResponse.sysPerformance);
  });

  //实时数据展示：成功率(业务处理,系统处理)查询
  app.get('/sas/timeDataDis/successRate/query', function (req, res) {
    res.send(queryResponse.successRate);
  });

  //实时数据展示：健康度查询
  app.get('/sas/timeDataDis/health/query', function (req, res) {
    res.send(queryResponse.health);
  });

  //实时数据展示：分省实时交易成功率查询
  app.get('/sas/timeDataDis/provinceSuccessRateOfTrans/query', function (req, res) {
    res.send(queryResponse.provinceSuccessRateOfTrans);
  });

  //实时数据展示：分省实时业务量查询
  app.get('/sas/timeDataDis/provinceVolumeOfBus/query', function (req, res) {
    res.send(queryResponse.provinceVolumeOfBus);
  });

  //实时数据展示：实时业务量查询
  app.get('/sas/timeDataDis/volumeOfBus/query', function (req, res) {
    res.send(queryResponse.volumeOfBus);
  });

  //实时数据展示：用户充值偏好查询
  app.get('/sas/timeDataDis/topUpPrefer/query', function (req, res) {
    res.send(queryResponse.topUpPrefer);
  });

  //重大活动总结/表单功能模块查询
  app.get('/sas/customActivity/summary/configModules/query', function (req, res) {
    res.send(queryResponse.configModules);
  });

  //重大活动总结/查询已选择功能模块
  app.get('/sas/customActivity/summary/savedConfig/query', function (req, res) {
    res.send(queryResponse.savedConfig);
  });

  //重大活动总结/健康度/活动期间健康度
  app.post('/sas/customActivity/summary/health/query', function (req, res) {
    res.send(queryResponse.summaryHealth);
  });

  //重大活动总结/交易量与去年同期对比
  app.post('/sas/customActivity/summary/busVolumeContrastive/query', function (req, res) {
    res.send(queryResponse.busVolumeContrastive);
  });

  //重大活动总结/健康度/活动期间健康度/最大值
  app.post('/sas/customActivity/summary/health/max/query', function (req, res) {
    res.send(queryResponse.healthMax);
  });

  //重大活动总结/健康度/活动期间健康度/最小值
  app.post('/sas/customActivity/summary/health/min/query', function (req, res) {
    res.send(queryResponse.healthMin);
  });

  //重大活动总结/健康度/活动期间健康度/平均值
  app.post('/sas/customActivity/summary/health/avg/query', function (req, res) {
    res.send(queryResponse.healthAvg);
  });

  //重大活动总结/各业务线交易占比
  app.post('/sas/customActivity/summary/busLineRatio/query', function (req, res) {
    res.send(queryResponse.busLineRatio);
  });

  //重大活动总结/系统性能/平均处理耗时
  app.post('/sas/customActivity/summary/averageProcessTime/query', function (req, res) {
    res.send(queryResponse.averageProcessTime);
  });

  //重大活动总结/系统性能/最大吞吐量
  app.post('/sas/customActivity/summary/maxThroughput/query', function (req, res) {
    res.send(queryResponse.maxThroughput);
  });

  //重大活动总结/系统性能/最大TPS
  app.post('/sas/customActivity/summary/maxTPS/query', function (req, res) {
    res.send(queryResponse.maxTPS);
  });

  //查询系统设计到的数据信息
  app.post('/sas/dataManager/dataQuality/dataDictionary/dataBase/query', function (req, res) {
    res.send(queryResponse.dataDictionaryDataBase);
  });

  //数据库表信息查询，支持基于表名字的中英文模糊查询
  app.post('/sas/dataManager/dataQuality/dataDictionary/table/query', function (req, res) {
    res.send(queryResponse.dataDictionaryTable);
  });

  //根据数据库和表，查询字段信息
  app.post('/sas/dataManager/dataQuality/dataDictionary/column/query', function (req, res) {
    res.send(queryResponse.dataDictionaryColumn);
  });
};